package com.ruoyi.bases.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bases.mapper.JwInternshipBasesMapper;
import com.ruoyi.bases.domain.JwInternshipBases;
import com.ruoyi.bases.service.IJwInternshipBasesService;

/**
 * 校外实习基地情况Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class JwInternshipBasesServiceImpl implements IJwInternshipBasesService 
{
    @Autowired
    private JwInternshipBasesMapper jwInternshipBasesMapper;

    /**
     * 查询校外实习基地情况
     * 
     * @param ibId 校外实习基地情况主键
     * @return 校外实习基地情况
     */
    @Override
    public JwInternshipBases selectJwInternshipBasesByIbId(Long ibId)
    {
        return jwInternshipBasesMapper.selectJwInternshipBasesByIbId(ibId);
    }

    /**
     * 查询校外实习基地情况列表
     * 
     * @param jwInternshipBases 校外实习基地情况
     * @return 校外实习基地情况
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<JwInternshipBases> selectJwInternshipBasesList(JwInternshipBases jwInternshipBases)
    {
        return jwInternshipBasesMapper.selectJwInternshipBasesList(jwInternshipBases);
    }

    /**
     * 新增校外实习基地情况
     * 
     * @param jwInternshipBases 校外实习基地情况
     * @return 结果
     */
    @Override
    public int insertJwInternshipBases(JwInternshipBases jwInternshipBases)
    {
        return jwInternshipBasesMapper.insertJwInternshipBases(jwInternshipBases);
    }

    /**
     * 修改校外实习基地情况
     * 
     * @param jwInternshipBases 校外实习基地情况
     * @return 结果
     */
    @Override
    public int updateJwInternshipBases(JwInternshipBases jwInternshipBases)
    {
        jwInternshipBases.setUpdateTime(DateUtils.getNowDate());
        return jwInternshipBasesMapper.updateJwInternshipBases(jwInternshipBases);
    }

    /**
     * 批量删除校外实习基地情况
     * 
     * @param ibIds 需要删除的校外实习基地情况主键
     * @return 结果
     */
    @Override
    public int deleteJwInternshipBasesByIbIds(Long[] ibIds)
    {
        return jwInternshipBasesMapper.deleteJwInternshipBasesByIbIds(ibIds);
    }

    /**
     * 删除校外实习基地情况信息
     * 
     * @param ibId 校外实习基地情况主键
     * @return 结果
     */
    @Override
    public int deleteJwInternshipBasesByIbId(Long ibId)
    {
        return jwInternshipBasesMapper.deleteJwInternshipBasesByIbId(ibId);
    }
}
